<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<title>无标题文档</title>
		<style type="text/css">
			#div1{
				display:none;
			}
			#div2{
				display:none;
			}
			#div3{
				display:none;
			}
		</style>
	</head>
	<body>
		<div id="div">
			<div id="div1">1</div>
			<div id="div2">2</div>
			<div id="div3">3</div>
			<div id="div4">4</div>
			<div id="div5">5</div>
			<div id="div6">6</div>
		</div>
	</body>
	<script>
		window.onload = function (){
			var nodeChildNum = document.getElementById("div").children.length;
			alert(nodeChildNum);
		};
	</script>
</html>